package org.infodavid.common.model;

import java.util.Map;

import org.joda.time.DateTime;

/**
 * The Interface IOrganization.
 */
public interface IOrganization extends IEntity {

  /**
   * The Enum ELegalForm.
   */
  enum ELegalForm {
    /** The SA. */
    SA,

    /** The SARL. */
    SARL,

    /** The EURL. */
    EURL,

    /** The SCOP. */
    SCOP,

    /** The SEM. */
    SEM,

    /** The SNC. */
    SNC,

    /** The GIE. */
    GIE,

    /** The SEL. */
    SEL,

    /** The SCP. */
    SCP,

    /** The SCM. */
    SCM,

    /** The UNDEFINED. */
    UNDEFINED
  }

  /** The constant LOCAL_BEAN_JNDI_NAME. */
  String LOCAL_BEAN_JNDI_NAME = "IOrganization/local";

  /** The MAIN_SITE. */
  String MAIN_SITE = "mainSite";

  /** The DIRECTOR. */
  String DIRECTOR = "director";

  /** The CONTACTS. */
  String CONTACTS = "contacts";

  /** The ID. */
  String ID = "organizationKey";

  /** The LEGAL_FORM. */
  String LEGAL_FORM = "legalForm";

  /** The constant MAX_LENGTH_BUSINESS_TYPE. */
  int MAX_LENGTH_BUSINESS_TYPE = 128;

  /** The ORGANIZATION. */
  String ORGANIZATION = "organization";

  /** The REGISTRATION_DATE. */
  String REGISTRATION_DATE = "registrationDate";

  /** The TYPE. */
  String TYPE = "businessType";

  /**
   * Gets the main site.
   * @return the site
   */
  IOrganization getMainSite();

  /**
   * Sets the main site.
   * @param value the site
   */
  void setMainSite(IOrganization value);

  /**
   * Gets the director.
   * @return the director
   */
  IPerson getDirector();

  /**
   * Sets the director.
   * @param value the value
   */
  void setDirector(IPerson value);

  /**
   * Adds the contact.
   * @param value the value
   */
  void addContact(IUser value);

  /**
   * Gets the contacts.
   * @return the contacts
   */
  Map<Long,IUser> getContacts();

  /**
   * Removes the contact.
   * @param value the value
   * @return true, if successful
   */
  boolean removeContact(IUser value);

  /**
   * Gets the business type.
   * @return the type
   */
  String getBusinessType();

  /**
   * Gets the legal form.
   * @return the form
   */
  ELegalForm getLegalForm();

  /**
   * Gets the registration date.
   * @return the registration date
   */
  DateTime getRegistrationDate();

  /**
   * Sets the business type.
   * @param value the value
   */
  void setBusinessType(String value);

  /**
   * Sets the legal form.
   * @param value the value
   */
  void setLegalForm(ELegalForm value);

  /**
   * Sets the registration date.
   * @param value the date
   */
  void setRegistrationDate(DateTime value);
}
